home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2001 December / pcwk12201b.iso / Wersje pelne i specjalne / Winamp 2.77 i 3.0beta / wasabi-sdk_beta1.exe / studio / generic / generic.h < prev    next >
C/C++ Source or Header  |  2001-10-08  |  2KB  |  85 lines

  1. #ifndef _GENERIC_H    //EDITME
  2. #define _GENERIC_H    //EDITME
  3.  
  4. #include "../studio/wac.h"
  5.  
  6. #include "../common/SimpleWndCreate.h"
  7.  
  8. class GenericWnd;
  9.  
  10. #define WACNAME WACgeneric    //EDITME
  11.  
  12. #define WACPARENT WAComponentClient
  13. class WACNAME : public WACPARENT {
  14. public:
  15.   WACNAME();
  16.   virtual ~WACNAME();
  17.  
  18.   virtual const char *getName();
  19.   virtual GUID getGUID();
  20.  
  21.   virtual void onCreate();
  22.   virtual void onDestroy();
  23.   virtual void onRegisterServices();
  24.   virtual RootWnd *createWindow(int n, RootWnd *parentWnd);
  25.   int destroyWindow(RootWnd * deadWnd);
  26.   ThingerBitmapInfo getThingerBitmapInfo();
  27.   
  28. //
  29. // ===========================================================================
  30. // ===========================================================================
  31. //
  32. //  These items are needed for our component to be used as a Window Creation
  33. // object.
  34. public:
  35.  
  36.   static WACNAME & Main() {
  37.     // Make that instance available as a static item.
  38.     return * myInstance;
  39.   }
  40.   //  
  41.   //  Therefore, if we wish, we can call down to that instance
  42.   // to handle any of the necessary function calls required by
  43.   // the template.  Hooray for legacy code support.
  44.   //
  45.  
  46.   //
  47.   //  The rest of the methods listed here are the required static
  48.   // methods for any object that is passed into the above template.
  49.   //
  50.   // =========================================================================
  51.   //
  52.   static const char *getWindowNameStatic() { 
  53.     return Main().getName(); 
  54.   }
  55.   //
  56.   static GUID getGUIDStatic() { 
  57.     return Main().getGUID(); 
  58.   }
  59.   //
  60.   static RootWnd *createWindowStatic(int n, RootWnd *parentWnd) {
  61.     return Main().createWindow(n, parentWnd);
  62.   }
  63.   //
  64.   static int destroyWindowStatic(RootWnd *deadWnd) {
  65.     return Main().destroyWindow(deadWnd);
  66.   }
  67.   //
  68.   // If you are going to be using the Thinger template, 
  69.   // you also must provide the following method:
  70.   //
  71.   static ThingerBitmapInfo getThingerBitmapInfoStatic() {
  72.     return Main().getThingerBitmapInfo();
  73.   }
  74.  
  75. private:
  76.   static WACNAME *     myInstance;
  77.  
  78. // ===========================================================================
  79. private:
  80.   // fill in your private data here
  81.   GenericWnd *wnd;
  82. };
  83.  
  84. #endif
  85.